package com.aric.springbootmusic.entity.param;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LoginUserParam {
    @NotBlank(message = "用户名不能为空!")
    private String username;
    @NotBlank(message = "密码不能为空!")
    @Size(min = 6,max = 13,message = "密码长度必须在6～13位之间")
    @Pattern(regexp="(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&+=])(?=\\S+$).{6,13}",message = "密码必须包含数字，大小写字母以及(_~!@#$%^&)括号中的任意一个字符")
    private String password;
}
